package cn.com.basic.framework.datahub.error;

import cn.com.basic.framework.exception.enums.IErrorCode;

/**
 * Datahub 异常
 *
 * @author zhuxj
 */
public enum PublishError implements IErrorCode {
    PUT_RECORD_ERROR("80001", "提交记录失败");

    private String code;
    private String description;

    PublishError(String code, String description) {
        this.code = code;
        this.description = description;
    }

    @Override
    public String getKey() {
        return this.code;
    }

    @Override
    public String getValue() {
        return this.description;
    }

    @Override
    public String toString() {
        return String.format("Code:[%s], Describe:[%s]", this.code, this.description);
    }

}
